<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>系统字典管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/lib/layui/css/layui.css">
    <link rel="stylesheet" href="/statics/layui/font/font.css" media="all"/>

</head>
<body>

<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header">字典添加</div>
        <div class="layui-card-body" style="padding: 15px;">
            <form class="layui-form" lay-filter="formData">
                <input type="hidden" name="id" class="formData">
                <div class="layui-form-item">
                    <label class="layui-form-label">分组名称:</label>
                    <div class="layui-input-block">
                        <input type="text" name="name" id="name" lay-verify="required" placeholder="分组名称"
                               autocomplete="off" class="layui-input formData">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">分组编码:</label>
                    <div class="layui-input-block">
                        <input type="text" name="code" id="code" lay-verify="required" placeholder="分组编码"
                               autocomplete="off" class="layui-input formData">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">备注：</label>
                    <div class="layui-input-block">
                        <textarea rows="" cols="" class="layui-textarea formData" name="remark" id="remark"></textarea>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript" src="/lib/layui/layui.js"></script>
<script src="/static/js/main.js"></script>
<!--<script type="text/javascript" src="../../../statics/js/sys/editDict.js"  charset="utf-8"></script>-->
<script>
    layui.use(['form', 'sessionFun', 'configure', 'configureCom'], function () {
        window.$ = layui.$;
        var form = layui.form;
        var configure = layui.configure;
        var configureCom = layui.configureCom;
        var sessionFun = layui.sessionFun;
        var listData = sessionFun.get(configure.SESSION_LIST_DATA);
        if (listData) {
            form.val('formData', listData);
        }
        form.render();
    });
    function getData(){
        var data = {};
        $('.formData').each(function(index,item){
            var key = $(item).attr('name');
            data[key] = $(item).val();
        });
        return data;
    }
</script>
</body>
</html>
